/**
 * 2
 *  
 * @Author : roryrywang
 * @DateTime : 24-9-10 下午6:51
 */

#include <iostream>
#include <vector>

using namespace std;

vector<int> solution(int n) {
    vector<int> d(n + 1, 1);
    vector<int> weaks(n + 1, 0);
    int maxWeak = 0;
    for (int i = 1; i <= n; i++) {
        if (i != 1) {
            d[i] += 1;
        }
        int weak = 0;
        for (int j = i - 1; j >= 2; j--) {
            if (d[j] > d[i])weak++;
        }
        weaks[weak]++;
        maxWeak = max(maxWeak, weak);
        for (int j = 2; j * i <= n; j++) {
            d[i * j] += 1;
        }
    }
    return {maxWeak, weaks[maxWeak]};
}